package test05.demo2;

public class MainTest01 {
    public static void main(String[] args) {
        // 1.实例化一个帐号对象
        Account account = new Account(5000);

        // 2.实例化 Runnable 对象
        MyRunnable mr01 =
                new MyRunnable(account, "老公", 3000);

        MyRunnable mr02 =
                new MyRunnable(account, "老婆", 4000);

        // 3.实例化线程对象
        Thread t1 = new Thread(mr01);
        Thread t2 = new Thread(mr02);

        // 4.启动线程
        t1.start();
        t2.start();
    }
}